import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopActivityGrouponLogController } from '../../../controllers';
const uctoominishopActivityGrouponLogRouter = new Router();
const minishopActivityGrouponLogController = new uctooMinishopActivityGrouponLogController();

uctoominishopActivityGrouponLogRouter.post('/add', requireUser, minishopActivityGrouponLogController.add);
uctoominishopActivityGrouponLogRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_activity_groupon_log'), minishopActivityGrouponLogController.edit);
uctoominishopActivityGrouponLogRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_activity_groupon_log'), minishopActivityGrouponLogController.delete);

//For getting minishopActivityGrouponLog with permission control
uctoominishopActivityGrouponLogRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_activity_groupon_log'), minishopActivityGrouponLogController.getSingle);
uctoominishopActivityGrouponLogRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_activity_groupon_log'), minishopActivityGrouponLogController.getMany);
uctoominishopActivityGrouponLogRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_activity_groupon_log'), minishopActivityGrouponLogController.getMany);

//#endregion AutoCreateCode
export default uctoominishopActivityGrouponLogRouter;
